package com.yyx.server.controller;

import com.yyx.server.service.EmployeeService;
import com.yyx.server.vo.PieVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 数据统计
 * @author YongXin
 * @date Created in 2021/8/19 16:20
 */
@RestController
public class StatisticController {

    @Autowired
    private EmployeeService employeeService;

    @ApiOperation("职称信息统计")
    @GetMapping("/sta/joblevel")
    public List<PieVo> staJobLevel(){
        return employeeService.staJobLevel();
    }

    @ApiOperation("职位信息统计")
    @GetMapping("/sta/pos")
    public Map<String,Integer> staPos(){
        return employeeService.staPos();
    }
}
